<%@page import="upcweb.util.CheckLogin"%>
<%@page import="upcweb.modelo.*"%>
<%@page import="upcweb.negocio.*"%>
<%@page import="java.util.ArrayList"%>	
<head>
	

	<script type="text/javascript" src="js/jquery.scrollTo-min.js"></script>
	<script type="text/javascript" src="js/SmartCart.js"></script>

	<script type="text/javascript">

		$(document).ready(function() {
		  // call the cart function
			$("#sc_cart").smartCart();
		}); 
	</script>
  
	<link rel="stylesheet" type="text/css"  href="css/style_smartcart.css " />
</head>
	      	
			<%	
				ClsUsuario user = new CheckLogin().getSession(request, response);
				if (user==null) user = new ClsUsuario();
		        int nu_solicitud = 0;
		    
				String Noclub = "", Nodireccion ="", Nociudad = "", Notelefono = "";
		
					ArrayList<ClsSolicitud> arrayNumero = new BsSolicitud().ObtenerNumeroReserva();
					
					for(ClsSolicitud SolicitudBE : arrayNumero){

						nu_solicitud = SolicitudBE.getNu_solicitud();
					
					}
            %>      	
	      	
	      	
	      	<%	

		        int id_responsable = user.getCo_responsable();
	
				String NoResponsable = "", Nocorreo ="", Txdireccion = "";
		
					ArrayList<ClsSolicitud> arrayResponsable = new BsSolicitud().BusquedaResponsableID(id_responsable);
					
					for(ClsSolicitud SolicitudBE : arrayResponsable){

						id_responsable=SolicitudBE.getCo_responsable();
						NoResponsable = SolicitudBE.getNo_responsable();
						Nocorreo = SolicitudBE.getNo_correo();
						Txdireccion = SolicitudBE.getTx_direccion();
					
					}
            %>      	
	      	
	         		
	      		
	      		

	      		
	      		<div class="widget ">
	      			
	      			<div class="widget-header" style="width:1200px;">
	      				<i class="icon-user"></i>
	      				<h3>Registrar Reserva</h3>
	  				</div> <!-- /widget-header -->
					
					
					
					<div class="widget-content" style="width:1200px">
						
						
						
						<div class="tabbable"  style="width:1200px">
	
						<br>
						
							<div class="tab-content"  style="width:1200px">
								<div class="tab-pane active" id="profile">
								
				
								<div class="widget widget-table action-table">
						

					
								
								<div class="tab-pane" id="settings">
									<form id="edit-profile2" class="form-horizontal">
										<fieldset>
                                            <input id="txh_responsable" type="hidden" value="<%=id_responsable%>" name="opcion" >
											<div class="control-group">
												<label class="control-label" for="accountusername">Nro reserva</label>
												<div class="controls">
													<input type="text" style="width:200px" disabled="disabled" class="input-large" id="txt_numero_reserva" value="<%=nu_solicitud%>">
												</div>
											</div>
											<div class="control-group">
												<label class="control-label" for="emailserver">Responsable</label>
												<div class="controls">
													<input type="text" style="width:500px" disabled="disabled" class="input-large" id="txt_responsable" value="<%=NoResponsable%>">
												</div>
											</div>
											
											<div class="control-group">
												<label class="control-label" for="emailserver">Direccion</label>
												<div class="controls">
													<input type="text" class="input-large" disabled="disabled" style="width:500px" id="txt_direccion" value="<%=Txdireccion%>">
												</div>
											</div>
											
											<div class="control-group">
												<label class="control-label" for="emailserver">Correo</label>
												<div class="controls">
													<input type="text" class="input-large" disabled="disabled" style="width:500px" id="txt_correo" value="<%=Nocorreo%>">
												</div>
											</div>
											
											<div class="control-group">
												<label class="control-label" for="accountpassword">Club</label>
												<div class="controls">
												
												<select id="cbo_club" name="cbo_club">
												     	<option value="">--Seleccione--</option>
								                		<%
								                		    ClsClub CluBE = new ClsClub();
									                	    CluBE.setCo_club(0);
									                	    CluBE.setNo_club("");     
									                        CluBE.setTx_direccion("");
															ArrayList<ClsClub> ListaClub = new BsClub().ListarClubID(CluBE);
															for(ClsClub objE: ListaClub){
														%>																					
															<option value=<%=objE.getCo_club() %>><%=objE.getNo_club() %></option>	                	
														<%	
															}
														%>
												</select>	
										
												
												</div>
											</div>
											
											<div class="widget-header">
												<i class="icon-th-list"></i>
												<h3>Agregacion de Servicio</h3>
											</div> <!-- /widget-header -->
													<br />
													

										        <div id="smartcart" class="scContainer" style="width:1100px">         		
										          <div id="sc_productlist" class="scProductList" >
										           
										 
										           
										           <div class="scProductListItem">
										                     	<%
								              
															ArrayList<ClsSolicitud> ListaServicio = new BsSolicitud().ListarServicioReserva();
										           	         int item = 100;
															for(ClsSolicitud objS : ListaServicio){
																
														%>	 
										        		    <table border="0" cellpadding="2" cellspacing="2">
										                <tr>
										                  <td rowspan="3"><img width="100px" style="border-radius:8px;" src="imgservicio<%=objS.getNo_imagen()%>" /></td>
										                  <td><strong><span id="prod_name<%=item%>"><%=objS.getCo_servicio()+"  "+objS.getNo_tipo_servicio()+" "+objS.getNo_servicio()+" "+item %></span></strong></td>
										
										                </tr>

										                
										                <tr>
										                  <td><label>Precio:</label> S/.<span id="prod_price<%=item%>"><%=objS.getMt_costo_por_persona()%></span></td>
										                </tr>               
										                <tr>
										                  <td><label>Cantidad:</label>
										                    <input name="prod_qty" class="scText" id="prod_qty<%=item%>" value="1" size="3" type="text">
										
										  									<input type="button" rel="<%=item%>" class="scItemButton scBtn" value="Add Servicio"></td>
										                </tr>              
										                </table>
										                
										                          	<%	
										           	      item = item + 1;
															}
														%>
			
										            </div>  
										             
										 
						
										 
										                  
										                       
										      		</div>
										      		<!-- End Product list HTML -->
										          
										          <!-- Cart HTML -->
										          <div id="sc_cart" class="scCart" style="width:600px">
										              <!-- Selected Product ID/Quantity are stored on the <select> element below -->
										              <select id="product_list" name="product_list[]" style="display:none;" multiple="multiple">
										              </select>               
										               <div class="scCartListHead">
										                   <table width='550px'><tr>
										                     <td width='80px'>Codigo</td>
										                     <td width='310px'>&nbsp;Servicio</td>
										                     <td width='80px'>Cantidad</td>
										                     <td width='80px'>&nbsp;Monto</td>
										                   </tr></table>
										            	 </div>
										            	 <!-- Cart List: Selected Products are listed inside div below -->
										               <div id="sc_cartlist" class="scCartList"></div>
										               
										               <div class="scCartListHead">
										                   <table width='100%'><tr>
										                     <td>
										                        <!-- Message Label -->
										                        <span id="sc_message"></span></td>
										                     <td width='100px'>Subtotal (S/):</td>
										                     <td width='120px'> 
										                        <!-- Sub Total Label -->
										                        <span id="sc_subtotal"></span>
										                     </td>
										                   </tr></table>
										            	 </div>
										               <br>
										               <input id="id_hire" type="hidden" name="opcion" >
										            	 <input style="width:200px;height:35px;float:right;"  type="button" onclick="InsertarReserva(this)"  class="scBtn" value="REGISTAR RESERVA">
										          </div>
										          <!-- End Cart HTML -->
										          
							
										          
										     </div>
											      
													
													
			
				
				
											
											
											
										</fieldset>
									</form>
								</div>
								
				</div> <!-- /widget -->
				
									
		
								</div>

							</div>
						  
						  
						</div>
						
						
						
						
						
					</div> <!-- /widget-content -->
						
				</div> <!-- /widget -->
	      		
	
	      	
	      	 
	 